package com.ruoyi.web.controller.crm;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.CrmStudent;
import com.ruoyi.system.domain.CrmStudentVo;
import com.ruoyi.system.service.ICrmStudentService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 学员信息Controller
 * 
 * @author Bill
 * @date 2024-06-22
 */
@Controller
@RequestMapping("/crm/duplicate/student")
public class CrmDuplicateController extends BaseController
{
    private String prefix = "crm/duplicate/student";

    @Autowired
    private ICrmStudentService crmStudentService;

    @RequiresPermissions("system:student:view")
    @GetMapping()
    public String student()
    {
        return prefix + "/student";
    }

    /**
     * 查询学员信息列表
     */
    @RequiresPermissions("system:student:list")
    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(CrmStudent crmStudent)
    {
        startPage();
        List<CrmStudent> list = crmStudentService.selectCrmStudentList(crmStudent);
        return getDataTable(list);
    }
}
